package cn.edu.tsinghua.cic.ccss.dto;

import java.util.Date;

import org.forten.core.dto.GeneralDto;
import org.forten.dataio.excel.model.ExportCellDef;
import org.forten.dataio.excel.model.WorkbookDef;
import org.forten.dataio.excel.model.ExportCellDef.ExportCellDataType;
@WorkbookDef(headText={"上课时间","课程名","学时","选课人次",
		"实际选课人次","选课学时","实际选学学时"})
public class CourseStatisticsDto4Export implements GeneralDto{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8997550821768860721L;
	@ExportCellDef(colNum = 0, dataType = ExportCellDataType.DATETIME)
	private Date teachTime;// 上课时间
	@ExportCellDef(colNum = 1)
	private String courseName;// 课程名称
	@ExportCellDef(colNum = 2 ,dataType = ExportCellDataType.NUMBER)
	private int credit;// 学时
	@ExportCellDef(colNum = 3, dataType = ExportCellDataType.NUMBER)
	private long classChosenTotalNum; //选过课的总人数
	@ExportCellDef(colNum = 4, dataType = ExportCellDataType.NUMBER)
	private int classChosenNum;// 已选课人数（实际选学人次）
	@ExportCellDef(colNum = 5, dataType = ExportCellDataType.NUMBER)
	private int totalCredit; //选课学时
	@ExportCellDef(colNum = 6, dataType = ExportCellDataType.NUMBER)
	private long actualCredit; //实际选学学时
	
	private long totalCreditNums;
	private long totalChosenStuNums;
	private long totalActualChosenStuNums;
	private long totalChosenCreNums;
	private long totalActualCreNums;
	
	public Date getTeachTime() {
		return teachTime;
	}
	public void setTeachTime(Date teachTime) {
		this.teachTime = teachTime;
	}
	public String getCourseName() {
		return courseName;
	}
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	public int getCredit() {
		return credit;
	}
	public void setCredit(int credit) {
		this.credit = credit;
	}
	public long getClassChosenTotalNum() {
		return classChosenTotalNum;
	}
	public void setClassChosenTotalNum(long classChosenTotalNum) {
		this.classChosenTotalNum = classChosenTotalNum;
	}
	public int getClassChosenNum() {
		return classChosenNum;
	}
	public void setClassChosenNum(int classChosenNum) {
		this.classChosenNum = classChosenNum;
	}
	public int getTotalCredit() {
		return totalCredit;
	}
	public void setTotalCredit(int totalCredit) {
		this.totalCredit = totalCredit;
	}
	public long getActualCredit() {
		return actualCredit;
	}
	public void setActualCredit(long actualCredit) {
		this.actualCredit = actualCredit;
	}
	
	public long getTotalCreditNums() {
		return totalCreditNums;
	}
	public void setTotalCreditNums(long totalCreditNums) {
		this.totalCreditNums = totalCreditNums;
	}
	public long getTotalChosenStuNums() {
		return totalChosenStuNums;
	}
	public void setTotalChosenStuNums(long totalChosenStuNums) {
		this.totalChosenStuNums = totalChosenStuNums;
	}
	public long getTotalActualChosenStuNums() {
		return totalActualChosenStuNums;
	}
	public void setTotalActualChosenStuNums(long totalActualChosenStuNums) {
		this.totalActualChosenStuNums = totalActualChosenStuNums;
	}
	public long getTotalChosenCreNums() {
		return totalChosenCreNums;
	}
	public void setTotalChosenCreNums(long totalChosenCreNums) {
		this.totalChosenCreNums = totalChosenCreNums;
	}
	public long getTotalActualCreNums() {
		return totalActualCreNums;
	}
	public void setTotalActualCreNums(long totalActualCreNums) {
		this.totalActualCreNums = totalActualCreNums;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (actualCredit ^ (actualCredit >>> 32));
		result = prime * result + classChosenNum;
		result = prime * result
				+ (int) (classChosenTotalNum ^ (classChosenTotalNum >>> 32));
		result = prime * result
				+ ((courseName == null) ? 0 : courseName.hashCode());
		result = prime * result + credit;
		result = prime * result
				+ ((teachTime == null) ? 0 : teachTime.hashCode());
		result = prime * result + totalCredit;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CourseStatisticsDto4Export other = (CourseStatisticsDto4Export) obj;
		if (actualCredit != other.actualCredit)
			return false;
		if (classChosenNum != other.classChosenNum)
			return false;
		if (classChosenTotalNum != other.classChosenTotalNum)
			return false;
		if (courseName == null) {
			if (other.courseName != null)
				return false;
		} else if (!courseName.equals(other.courseName))
			return false;
		if (credit != other.credit)
			return false;
		if (teachTime == null) {
			if (other.teachTime != null)
				return false;
		} else if (!teachTime.equals(other.teachTime))
			return false;
		if (totalCredit != other.totalCredit)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "CourseStatisticsDto4Export [teachTime=" + teachTime
				+ ", courseName=" + courseName + ", credit=" + credit
				+ ", classChosenTotalNum=" + classChosenTotalNum
				+ ", classChosenNum=" + classChosenNum + ", totalCredit="
				+ totalCredit + ", actualCredit=" + actualCredit + "]";
	}
	
	
}
